<!--发货-->
<div id="delivery-modal" class="modal fade modal_small" role="dialog" aria-labelledby="myModalLabel10" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">发货</h4>
            </div>
            <form action="<?php echo getUrl('order/home/delivery')?>" class="form-horizontal" id="delivery-form" method="post">
                <div class="modal-body">
                    <div class="form-group" id="region" data-url="<?php echo getUrl('common/ajaxChangeCheck');?>">
                        <label class="control-label col-md-2">快递公司<span class="required">*</span></label>
                        <div class="col-xs-9">
                            <select  id="express" name="express" class="form-control">
                                    <option value="">请选择快递公司</option>
                                <?php foreach ($ship as $s): ?>
                                    <option value="<?php echo $s['shipping_name']?>" ><?php echo $s['shipping_name']?></option>
                                <?php endforeach;?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-2">快递单号<span class="required">*</span></label>
                        <div class="col-md-9">
                            <input class="form-control required" name="express_bill" type="text"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-2">操作备注<span class="required">*</span></label>
                        <div class="col-md-9">
                            <textarea name="note" placeholder="请输入操作备注" rows="3" class="form-control required"></textarea>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="order_id" value="<?php echo $info["id"]?>" >
                    <button class="btn default" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> 关闭</button>
                    <button class="btn green field-submit-btn"><i class="fa fa-save"></i> 保存</button>
                    <script type="text/javascript">
                        $(function () {
                            $("select").select2();

                            var modal = $("#delivery-modal");
                            $(".delivery").live('click',function () {
                                modal.find('.has-error').removeClass('has-error').find('.validate_message').remove();
                                modal.find('.show_message_error').remove();
                                modal.find('#express').val('');
                                modal.find('[name="express_bill"]').val('');
                                modal.find('[name="note"]').val('');
                                modal.modal();
                            });

                            $.e_validate.init('#delivery-form',{modal:modal,ignore:'',successCallback:function(data){
//                                $(".status-str").html(data.data.status_format_str);
//                                $(".buttons").html(data.data.buttons);
                                history.go(0);
                            }});
                        });
                    </script>
                </div>
            </form>
        </div>
    </div>
</div>